home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 20 code / Advanced AOCE Templates / Orbits.r < prev    next >
Encoding:
Text File  |  1994-09-23  |  8.3 KB  |  321 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Orbits.r
  3.  
  4.     Contains:    Planetary orbit display templates
  5.  
  6.     Written by:    Harry Chesley
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc..
  9.  
  10.     Change History (most recent first):
  11.  
  12.                    5/25/94    hrc        created
  13.  
  14.     To Do:
  15. */
  16.  
  17. #include "Types.r"
  18. #include "OCE.r"
  19.  
  20. #include "Orbits.h"
  21.  
  22. include "Orbits.rsrc" not 'ckid';
  23.  
  24. #define kOrbitsRecordType "hrc  Orbits"
  25. #define kPlanetAttributeType "hrc  Planet"
  26.  
  27. #define kOrbitsMainAspect    1000
  28. #define kOrbitsListPage    1100
  29. #define kOrbitsPlotPage    1200
  30.  
  31. // Card size:
  32.  
  33. #define kOrbitsPageWidth 400
  34. #define kOrbitsPageHeight 300
  35.  
  36. // Properties in main aspect:
  37.  
  38. #define kOrbitsAttributeType    "hrc  Orbits info"
  39.  
  40. resource 'deta' (kOrbitsMainAspect, purgeable) {
  41.     0,                    // Priority (unused)
  42.     dropCheckConflicts,    // Drop check flag
  43.     isMainAspect        // Is the main aspect
  44. };
  45.  
  46. resource 'rstr' (kOrbitsMainAspect+kDETTemplateName, purgeable) {
  47.     "hrc  Orbits main aspect"
  48. };
  49.  
  50. resource 'rstr' (kOrbitsMainAspect+kDETRecordType, purgeable) {
  51.     kOrbitsRecordType
  52. };
  53.  
  54. resource 'rstr' (kOrbitsMainAspect+kDETAspectKind, purgeable) {
  55.     "orbits"
  56. };
  57.  
  58. resource 'rstr' (kOrbitsMainAspect+kDETAspectWhatIs, purgeable) {
  59.         "Orbits\n\This is a set of solar orbits."
  60. };
  61.  
  62. resource 'rstr' (kOrbitsMainAspect+kDETAspectAliasKind, purgeable) {
  63.     "orbits alias"
  64. };
  65.  
  66. resource 'rstr' (kOrbitsMainAspect+kDETAspectAliasWhatIs, purgeable) {
  67.         "Orbits alias\n\nThis is an alias to a set of solar orbits. "
  68.         "To see the orbits, open this icon."
  69. };
  70.  
  71. resource 'rst#' (kOrbitsMainAspect+kDETAspectCategory, purgeable) {
  72.     { "Celestial" }
  73. };
  74.  
  75. resource 'rstr' (kOrbitsMainAspect+kDETAspectNewMenuName, purgeable) {
  76.     "New Orbits"
  77. };
  78.  
  79. resource 'rstr' (kOrbitsMainAspect+kDETAspectNewEntryName, purgeable) {
  80.     "untitled orbits"
  81. };
  82.  
  83. // attributes to lookup
  84. resource 'dett' (kOrbitsMainAspect+kDETAspectLookup, purgeable)
  85.     {{
  86.     { kOrbitsAttributeType }, typeBinary, useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef,
  87.         {
  88.         'long', kOrbitsNowProperty,        0;
  89.         };
  90.     { kPlanetAttributeType }, 0, notForInput, notForOutput, useInSublist, isNotAlias, isNotRecordRef,
  91.         {
  92.         };
  93.     }};
  94.  
  95. resource 'rst#' (kOrbitsMainAspect+kDETAspectBalloons,purgeable)
  96.     {{
  97.     "The current time.", "The current time. Cannot be edited because the user record is locked or you do not have privileges to make changes here.",
  98.     }};
  99.  
  100. data 'detb' (kOrbitsMainAspect+kOrbitsTimeProperty, purgeable)
  101.     { $"0000 0000 0000 0000 0000" };
  102.  
  103. resource 'detn' (kOrbitsMainAspect+kOrbitsNowProperty, purgeable)
  104.     { 1 };
  105.  
  106. resource 'detn' (kOrbitsMainAspect+kOrbitsCustomViewProperty, purgeable)
  107.     { 0 };
  108.  
  109. resource 'rstr' (kOrbitsMainAspect+kDETAspectDragInString, purgeable) {
  110.     "Do you want to add %3%“^3”%the selected items% to the orbits list of *0x/the/* ^1 “^2”?"
  111. };
  112.  
  113. resource 'rstr' (kOrbitsMainAspect+kDETAspectDragInVerb, purgeable) {
  114.     "Add"
  115. };
  116.  
  117. resource 'rstr' (kOrbitsMainAspect+kDETAspectDragInSummary, purgeable) {
  118.     "Add Body"
  119. };
  120.  
  121. resource 'rst#' (kOrbitsMainAspect+kDETAspectAttrDragIn,purgeable)
  122.     {{
  123.     "", kPlanetAttributeType, kPlanetAttributeType
  124.     }};
  125.  
  126. resource 'detw' (kOrbitsMainAspect+kDETAspectInfoPageCustomWindow, purgeable)
  127.     {
  128.     {0,0,kOrbitsPageHeight,kOrbitsPageWidth},
  129.     includePopup
  130.     };
  131.  
  132. #define kGeneva 3
  133. #define kPalatino 16
  134. #define kTimes    20
  135.  
  136. #define kDateLineTop    12
  137. #define kDateLineBottom    (kDateLineTop+16)
  138.  
  139. #define kNowTop            (kDateLineBottom+4)
  140. #define kNowBottom        (kNowTop+16)
  141.  
  142. #define kTitleTop        (kNowBottom+12)
  143. #define kTitleBottom    (kTitleTop+12)
  144.  
  145. #define kSublistTop        (kTitleBottom+2)
  146. #define kSublistBottom    (kOrbitsPageHeight-32)
  147. #define kSublistLeft    8
  148. #define kSublistRight    (kOrbitsPageWidth-8)
  149.  
  150. #define kButtonTop        (kSublistBottom+8)
  151. #define kButtonBottom    (kButtonTop+16)
  152.  
  153. #define kOpenLeft        62
  154. #define kOpenRight        112
  155.  
  156. #define kAddLeft        226
  157. #define kAddRight        276
  158.  
  159. #define kRemoveLeft        288
  160. #define kRemoveRight    338
  161.  
  162. #define kIconLeft        2
  163. #define kNameLeft        22
  164. #define kKindLeft        116
  165. #define kXLeft            162
  166. #define kYLeft            265
  167. #define kYRight            368
  168.  
  169. #define kIconEntryTop        -7
  170. #define kIconEntryBottom    9
  171. #define kEntryTop            -5
  172. #define kEntryBottom        9
  173.  
  174. resource 'deti' (kOrbitsListPage, purgeable) {
  175.     1000,
  176.     { kSublistTop, kSublistLeft, kSublistBottom, kSublistRight },
  177.     noSelectFirstText,
  178.     {
  179.     kDETNoProperty, kDETNoProperty, kOrbitsListPage;
  180.     },
  181.     {
  182.     kDETNoProperty, kDETNoProperty, kOrbitsListPage+1;
  183.     }};
  184.  
  185. resource 'rstr' (kOrbitsListPage+kDETTemplateName, purgeable) {
  186.     "hrc  Orbits list page"
  187. };
  188.  
  189. resource 'rstr' (kOrbitsListPage+kDETRecordType, purgeable) {
  190.     kOrbitsRecordType
  191. };
  192.  
  193. resource 'rstr' (kOrbitsListPage+kDETInfoPageName, purgeable) {
  194.     "List"
  195. };
  196.  
  197. resource 'rstr' (kOrbitsListPage+kDETInfoPageMainViewAspect, purgeable) {
  198.     "hrc  Orbits main aspect"
  199. };
  200.  
  201. // subPage view
  202.  
  203. resource 'detv' (kOrbitsListPage, purgeable)
  204.     {
  205.     {
  206.     kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
  207.         Bitmap { kDETLargeIcon };
  208.  
  209.     {kDateLineTop, kOrbitsPageWidth-196, kDateLineBottom, kOrbitsPageWidth-160}, kDETNoFlags, kDETNoProperty,
  210.     StaticTextFromView { kPalatino, 10, kDETLeft, kDETBold, "Time" };
  211.     {kDateLineTop-2, kOrbitsPageWidth-160, kDateLineBottom, kOrbitsPageWidth-8}, kDETEnabled, kOrbitsTimeProperty,
  212.     EditText { kPalatino, 12, kDETLeft, kDETNormal };
  213.  
  214.     {kNowTop, kOrbitsPageWidth-160, kNowBottom, kOrbitsPageWidth-8},
  215.         kDETNoFlags, kOrbitsNowProperty,
  216.         CheckBox { kPalatino, 10, kDETLeft, kDETBold, "Continuous Update", kOrbitsNowProperty };
  217.  
  218.     {kSublistTop-1, kSublistLeft-1, kSublistBottom+1, kSublistRight+1}, kDETNoFlags, kDETNoProperty,
  219.         Box { kDETUnused };
  220.  
  221.     {kTitleTop, kSublistLeft+kNameLeft, kTitleBottom, kSublistLeft+kKindLeft-2},
  222.         kDETNoFlags, kDETNoProperty,
  223.         StaticTextFromView { kPalatino, 10, kDETLeft, kDETNormal, "Name" }; 
  224.  
  225.     {kTitleTop, kSublistLeft+kKindLeft, kTitleBottom, kSublistLeft+kXLeft},
  226.         kDETNoFlags, kDETNoProperty,
  227.         StaticTextFromView { kPalatino, 10, kDETLeft, kDETNormal, "Kind" }; 
  228.  
  229.     {kTitleTop, kSublistLeft+kXLeft, kTitleBottom, kSublistLeft+kYLeft},
  230.         kDETNoFlags, kDETNoProperty,
  231.         StaticTextFromView { kPalatino, 10, kDETCenter, kDETNormal, "X" }; 
  232.  
  233.     {kTitleTop, kSublistLeft+kYLeft, kTitleBottom, kSublistLeft+kYRight},
  234.         kDETNoFlags, kDETNoProperty,
  235.         StaticTextFromView { kPalatino, 10, kDETCenter, kDETNormal, "Y" }; 
  236.  
  237.     {kButtonTop, kOpenLeft, kButtonBottom, kOpenRight}, 
  238.         kDETNoFlags, kDETOpenSelectedItems,
  239.         Button { kGeneva, 10,  kDETCenter, kDETNormal, "Open", kDETOpenSelectedItems };
  240.  
  241.     {kButtonTop, kAddLeft, kButtonBottom, kAddRight}, 
  242.         kDETNoFlags, kDETAddNewItem,
  243.         Button { kGeneva, 10, kDETCenter, kDETNormal, "Add…", kDETAddNewItem };
  244.  
  245.     {kButtonTop, kRemoveLeft, kButtonBottom, kRemoveRight}, 
  246.         kDETNoFlags, kDETRemoveSelectedItems,
  247.         Button { kGeneva, 10, kDETCenter, kDETNormal, "Remove", kDETRemoveSelectedItems };
  248.     };
  249.     };
  250.  
  251. resource 'detv' (kOrbitsListPage+1, purgeable)
  252.     {
  253.     {
  254.     {kIconEntryTop, kIconLeft, kIconEntryBottom, kNameLeft-4},
  255.         kDETHilightIfSelected, kDETAspectMainBitmap,
  256.         Bitmap { kDETSmallIcon };
  257.  
  258.     {kEntryTop, kNameLeft, kEntryBottom, kKindLeft-2},
  259.         kDETHilightIfSelected + kDETDynamicSize, kDETAspectName,
  260.         EditText { kPalatino, 12, kDETForceLeft, kDETNormal };
  261.  
  262.     {kEntryTop, kKindLeft, kEntryBottom, kXLeft},
  263.         kDETNoFlags, kDETAspectKind,
  264.         StaticText { kPalatino, 12, kDETLeft, kDETNormal };
  265.  
  266.     {kEntryTop, kXLeft, kEntryBottom, kYLeft},
  267.         kDETNoFlags, kXProperty,
  268.         StaticText { kPalatino, 12, kDETCenter, kDETNormal };
  269.  
  270.     {kEntryTop, kYLeft, kEntryBottom, kYRight},
  271.         kDETNoFlags, kYProperty,
  272.         StaticText { kPalatino, 12, kDETCenter, kDETNormal };
  273.     };
  274.     };
  275.  
  276. resource 'deti' (kOrbitsPlotPage, purgeable) {
  277.     2000,
  278.     kDETNoSublistRect,
  279.     noSelectFirstText,
  280.     {
  281.     kDETNoProperty, kDETNoProperty, kOrbitsPlotPage;
  282.     },
  283.     {
  284.     }};
  285.  
  286. resource 'rstr' (kOrbitsPlotPage+kDETTemplateName, purgeable) {
  287.     "hrc  Orbits plot page"
  288. };
  289.  
  290. resource 'rstr' (kOrbitsPlotPage+kDETRecordType, purgeable) {
  291.     kOrbitsRecordType
  292. };
  293.  
  294. resource 'rstr' (kOrbitsPlotPage+kDETInfoPageName, purgeable) {
  295.     "Plot"
  296. };
  297.  
  298. resource 'rstr' (kOrbitsPlotPage+kDETInfoPageMainViewAspect, purgeable) {
  299.     "hrc  Orbits main aspect"
  300. };
  301.  
  302. // subPage view
  303.  
  304. resource 'detv' (kOrbitsPlotPage, purgeable)
  305.     {
  306.     {
  307.     kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap,
  308.     Bitmap { kDETLargeIcon };
  309.  
  310.     {12, kOrbitsPageWidth-120, 28, kOrbitsPageWidth-8},
  311.         kDETNoFlags, kOrbitsCustomViewProperty,
  312.         CheckBox { kPalatino, 12, kDETLeft, kDETBold, "Show Orbits", kOrbitsCustomViewProperty };
  313.  
  314.     {44, 8, kOrbitsPageHeight-8, kOrbitsPageWidth-8}, kDETNoFlags, kDETNoProperty,
  315.         Box { kDETUnused };
  316.  
  317.     {47, 11, kOrbitsPageHeight-11, kOrbitsPageWidth-11}, kDETNoFlags, kOrbitsCustomViewProperty,
  318.         Custom { kDETUnused };
  319.     };
  320.     };
  321.